.class public Lcom/netease/newsreader/util/FileUtils$BitmapOfflineDownloaderTask;
.super Landroid/os/AsyncTask;
.source "FileUtils.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/util/FileUtils;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "BitmapOfflineDownloaderTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/util/List",
        "<",
        "Ljava/util/HashMap",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Object;",
        ">;>;",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        ">;"
    }
.end annotation


# instance fields
.field private mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 543
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 544
    iput-object p1, p0, Lcom/netease/newsreader/util/FileUtils$BitmapOfflineDownloaderTask;->mContext:Landroid/content/Context;

    .line 545
    return-void
.end method


# virtual methods
.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/util/List;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/util/FileUtils$BitmapOfflineDownloaderTask;->doInBackground([Ljava/util/List;)Ljava/lang/Void;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Ljava/util/List;)Ljava/lang/Void;
    .locals 9
    .parameter "params"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Ljava/util/List",
            "<",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;)",
            "Ljava/lang/Void;"
        }
    .end annotation

    .prologue
    .line 550
    const/4 v6, 0x0

    aget-object v2, p1, v6

    .line 551
    .local v2, imgList:Ljava/util/List;,"Ljava/util/List<Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v5

    .line 552
    .local v5, length:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-lt v1, v5, :cond_0

    .line 571
    invoke-interface {v2}, Ljava/util/List;->clear()V

    .line 572
    const/4 v6, 0x0

    return-object v6

    .line 553
    :cond_0
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/util/HashMap;

    .line 554
    .local v3, imgMap:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;"
    new-instance v6, Ljava/lang/StringBuilder;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "src"

    invoke-virtual {v3, v8}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v6}, Lcom/netease/newsreader/util/FileUtils;->access$0(Ljava/lang/StringBuilder;)V

    .line 555
    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->access$1()Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "http://"

    invoke-virtual {v7}, Ljava/lang/String;->length()I

    move-result v7

    const-string v8, "s.cimg.163.com/i/"

    invoke-virtual {v6, v7, v8}, Ljava/lang/StringBuilder;->insert(ILjava/lang/String;)Ljava/lang/StringBuilder;

    .line 556
    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->access$1()Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ".220x220.auto.jpg"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 559
    :try_start_0
    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->access$1()Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->access$1()Ljava/lang/StringBuilder;

    move-result-object v7

    .line 560
    const-string v8, "/"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->lastIndexOf(Ljava/lang/String;)I

    move-result v7

    add-int/lit8 v7, v7, 0x1

    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->access$1()Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->length()I

    move-result v8

    .line 559
    invoke-virtual {v6, v7, v8}, Ljava/lang/StringBuilder;->substring(II)Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Lcom/netease/newsreader/util/PicUtil;->isLocalPicExit(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_1

    .line 562
    invoke-static {}, Lcom/netease/newsreader/util/FileUtils;->access$1()Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 563
    .local v4, imgUrl:Ljava/lang/String;
    iget-object v6, p0, Lcom/netease/newsreader/util/FileUtils$BitmapOfflineDownloaderTask;->mContext:Landroid/content/Context;

    invoke-static {v4, v6}, Lcom/netease/newsreader/util/PicUtil;->downloadImgToLocal(Ljava/lang/String;Landroid/content/Context;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 552
    .end local v4           #imgUrl:Ljava/lang/String;
    :cond_1
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 566
    :catch_0
    move-exception v0

    .line 568
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method
